#include <stdio.h>
int main(){
    char c;
    int sum=0;
    int count=0;
    double average;
    scanf("%c",&c);
    while (c!='\0'&&c!='\n'){
        if (c==' '){
            scanf("%c",&c);
            continue;
        }
        if (c=='A'){
            sum+=4;
            count++;
            
        }else if (c=='B'){
            sum+=3;
            count++;
            
        }else if (c=='C'){
            sum+=2;
            count++;
            
        } else if (c=='D'){
            sum+=1;
            count++;
            
        }else if (c=='F'){
            sum+=0;
            count++;
            
        }else{
            printf("Unknow");
            return 0;
        }
        scanf("%c",&c);
       
    }
    average=(double)sum/(double)count;
    printf("%.2lf",average);
    return 0;
}